This invention relates to the architecture of digital computers, and more particularly it relates to the control circuitry in a digital computer which directs the sequence by which instructions are executed within the computer.
In general, the instructions which a digital computer executes are stored in a memory. Also, those instructions in the memory are arranged in a particular sequence called a program. And the computer must execute those instructions in that sequence in order to obtain the correct results.
Thus, a common sequence by which a digital computer operates is to fetch one instruction from the memory, then execute that instruction, then fetch the next instruction from memory, then execute that instruction, etc. This sequence is used, for example, in the IBM System/360, Model 50. See Microprogramming, Principles and Practices, 1970, page 34 by Samir S. Husson.
Also, the instructions generally call for operands to be fetched from and stored into the memory. Thus, on a more detailed level, the above instruction execution sequence is performed as follows. First, the digital computer fetches one instruction from the memory. Next the computer interprets that instruction. Next the computer fetches any operands that are required from the memory. Next, the computer performs arithmetic operations on those operands. And, next the computer stores the results back in the memory. This sequence is then repeated for the next instruction.
One problem, however, with the above instruction execution sequence is that the time that it takes to read an instruction or an operand from the memory is generally larger than the time that it takes the digital computer to perform an internal arithmetic operation on two operands. As one typical example, the memory read time may be one microsecond; whereas the digital computer internal cycle time may be only 0.1 microseconds. Thus, in the above described instruction sequence, the digital computer spends most of its time doing nothing because it must wait for the memory to supply its requested instructions and operands.
One obvious solution to the above problem is to simply use the fastest memories that technology has to offer. But this solution is unattractive because the cost of the highest speed memories is always substantially greater than the cost of slower memories. Thus, the solution is too expensive for many marketing needs.
Another solution is to construct the digital computer's control circuitry such that the computer executes several different programs in a time-multiplexed fashion. See for example, U.S. Pat. No. 3,980,992 to Levy et al. In a multiprogrammed computer, the computer can execute the first program until a memory read is made. At that point, the computer must stop executing the first program and start executing the second program. Execution of the second program can continue until a memory read for that program is made. Then the computer must start executing the third program. This sequence can continue until a memory read is made in the last program; in which case, the computer switches back to the first program and continues executing it from the point where it previously stopped.
In this manner, the digital computer has useful work to perform between its initiation of a read from the memory and the receipt of the requested information. Thus, efficient use is made of the computer's time, even though the memory is relatively slow.
But a problem with the above sequence is that it works only if there are multiple programs to be performed simultaneously. That is, the computer is inefficient if there is only one program to be performed. Also, the memory must be large enough to contain all of the programs at one time. And a larger memory adds to the cost of the system. Further, extra hardware is required in the digital computer to keep track of the state of each of the programs; and this also adds to the cost of the system. For example, in the computer of U.S. Pat. No. 3,980,992, separate sets of registers are required for each program that is being executed.
Another solution to the above problem is to construct the digital computer's control circuitry so that various portions of more than one instruction in a single program are processed in a time-interleaved sequence. For example, the computer may initiate the read for the next instruction that it is to perform prior to interpreting and executing the present instruction. Thus, that next instruction will be available from the memory when the time comes to perform it. This sequence is used, for example, in the IBM 7094. See Introduction to Computer Architecture, 1975, pages 383-384.
Some prior art computers go a step further by dividing the execution phase of each instruction into one portion which fetches operands and another portion which operates on those operands. Then, those portions for two different instructions are interleaved and overlapped. See, for example, "Directions and Issues in Architecture and Language", by Michael J. Flynn, Computer, October 1980, page 10.
However, both of these interleaving sequences also have severe limitations, as is discussed herein in conjunction with FIGS. 7A and 7B of the Detailed Description. Accordingly, it is a primary object of this invention to provide an improved digital computer which overcomes all of the above problems.